﻿using UnityEngine;
using System.Collections;

public class ARManager : MonoBehaviour
{
	private GameObject currentObj;
	int modelsIndex = 0;
	public Transform imageTarget;
	// Use this for initialization
	void Start ()
	{
	
	}
	
	// Update is called once per frame
	void Update ()
	{
	
	}
	
	void ShakeEvent ()
	{
		for (int i=0; i<imageTarget.childCount; i++) {
			if (imageTarget.GetChild (i).name != "ground") {
				Destroy (imageTarget.GetChild (i).gameObject);
			}
		}
		
	
		currentObj = (GameObject)Instantiate (Resources.Load (modelsIndex.ToString ()));
		currentObj.transform.parent = imageTarget.transform;
	}
}
